package edu.spec.student.controller;

import edu.spec.student.service.iface.IStudentEventService;
import edu.spec.basic.model.dto.MvcReturn;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.inject.Inject;

/**
 * Created by MadFrog on 2017/8/3.
 */
@Controller
@RequestMapping("/admin/statistics")
public class StatisticsController {

    @Inject
    private IStudentEventService studentEventService;

    @RequestMapping("/eventPage")
    public String eventPage(){
        studentEventService.countAttend(1);
        return "admin/eventStatistics";
    }

    @RequestMapping("/event/{eventId}")
    public MvcReturn loadEventData(@PathVariable Integer eventId){

        return new MvcReturn(true);
    }

}
